import request from '@/utils/request'
const uri = '/goodsSpuService/goods-spu'
export default{
    // 添加
    add(goods) {
      return request({
        url: `${uri}/add`,
        method: 'put',
        data: goods
      })
    },
    update(goods) {
        return request({
          url: `${uri}/update`,
          method: 'post',
          data: goods
        })
      },
      // 分页查询
      findByCondition(current, limit, queryObject) {
        return request({
          url: `${uri}/pageQueryCondition/${current}/${limit}`,
          method: 'post',
          data: queryObject
        })
      },
      
      // 通过ID查询
      findById(id) {
        return request({
          url: `${uri}/getById/${id}`,
          method: 'get'
        })
      },
      // 逻辑删除
      deleteById(id){
          return request({
            url: `${uri}/deleteById/${id}`,
            method: 'delete'
          })
      }
  }